package com.whosly.disclosure.early.handler.autoconfig.data;

import org.apache.commons.lang3.StringUtils;

public enum ActionHandlerType {
    /**
     * HTTP GET
     */
    GET,

    /**
     * HTTP POST
     */
    POST,

    /**
     * HTTP DELETE
     */
    DELETE,

    /**
     * HTTP OPTIONS
     */
    OPTIONS,

    /**
     * HTTP UNKNOW
     */
    UNKNOW,

    /**
     * 内部方法体
     */
    METHOD,

    ;

    public static final ActionHandlerType of(String name){
        for (ActionHandlerType type : values()) {
            if(StringUtils.equals(type.name(), name)){
                return type;
            }
        }

        return UNKNOW;
    }

}
